package com.amumu.drama.common.commpont;

import com.amumu.drama.common.base.annonation.OnContextInited;
import com.amumu.drama.common.base.annonation.OnJvmShutdown;
import com.amumu.drama.common.commpont.notify.Notifier;
import org.springframework.stereotype.Component;

/**
 * @author sunzhuang
 * @date 2024/11/4 17:18
 * @slogan 天下风云出我辈, 一入代码岁月催
 * @desc todo
 */
@Component
public class JvmContextManager {

    @OnContextInited
    public void init() {
        Notifier.Holder.INSTANT.start();
    }

    @OnJvmShutdown
    public void shutdown() {
        Notifier.Holder.INSTANT.shutdown();
    }
}
